/**
 * Copyright (c) iwindplus Technologies Co., Ltd.2024-2030, All rights reserved.
 */

package com.iwindplus.boot.redis.domain.enums;

import com.iwindplus.boot.domain.enums.BaseEnum;
import lombok.Getter;
import lombok.RequiredArgsConstructor;

/**
 * redis分布式锁类型.
 *
 * @author zengdegui
 * @since 2020/6/13
 */
@Getter
@RequiredArgsConstructor
public enum RedissonLockType implements BaseEnum<String> {

    /**
     * 非公平锁
     */
    LOCK("Lock", "非公平锁"),

    /**
     * 自旋锁
     */
    SPIN_LOCK("SpinLock", "自旋锁"),

    /**
     * 栅栏锁
     */
    FENCED_LOCK("FencedLock", "栅栏锁"),

    /**
     * 公平锁
     */
    FAIR_LOCK("FairLock", "公平锁"),

    /**
     * 读锁
     */
    READ_LOCK("RReadLock", "读锁"),

    /**
     * 写锁
     */
    WRITE_LOCK("RWriteLock", "写锁");

    /**
     * 分布式锁的名称
     */
    private final String value;

    /**
     * 分布式锁的描述
     */
    private final String desc;

}
